<template>
  <el-dialog
    title="浏览记录"
    :visible.sync="open"
    width="400px;"
    height="600px;"
    :before-close="handleCloseDialog"
  >
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="nickName" label="姓名"></el-table-column>
      <el-table-column prop="dtDate" label="日期"></el-table-column>
    </el-table>
  </el-dialog>
</template>

<script>
import { readRecord } from '@/api/spsMyInfo/message.js'
export default {
  name: 'browsingHistory',
  data() {
    return {
      tableData: [],
      open: false,
    }
  },
  methods: {
    handleOpenDialog(recordData) {
      const that = this
      readRecord(recordData).then((response) => {
        if (response.code === 200) {
          that.tableData = response.data
        } else {
          this.$message({ message: response.msg, type: 'error' })
        }
      })
      this.open = true
    },
    handleCloseDialog() {
      this.open = false
    },
  },
}
</script>

<style>
</style>